/******************************************************************************
 * * setting_dualsim.c - implementation of dualsim setting functions
 *
 * *(C) Copyright 2019 Asr International Ltd.
 * * All Rights Reserved
 * ******************************************************************************/

#include "setting_global.h"

Setting_Dual_Setting_Mng_t g_SettingDualSimMng;
UINT8                      g_SettingDualSimSelected;                                    // 1--SIM1, 2--SIM2
UINT8                      g_SettingDualSimNameTaRestCharacters;
VOID                       *gp_SettingDualSimSettingCurContainerListUIDesc      = NULL; // Current Normal_Container_List UI description
VOID                       *gp_SettingDualSimSettingCurListOnlyUIDesc           = NULL; // Current Normal_List_Only UI description
VOID                       *gp_SettingDualSimSettingCurNormalNoTitleLblTaUIDesc = NULL; // Current Normal_NoTitle_Label_Ta UI description

/**
 * sub-module entry
 * param (in) void
 * return  void
 */

VOID Setting_Dualsim_Main(VOID)
{
    // display dual sim setting UI
}

/**
 * sub-module event handler
 * param (in) void
 * return  void
 */
VOID Setting_Dualsim_Event_handle(VOID)
{
    // event and message dispatch
}

/**
 * initiate call sub-module
 * param (in) pNvPara: NV_UI_Settings_t*
 * return  void
 */
VOID Setting_Dualsim_Init_Req(NV_UI_Settings_t *pNvPara)
{
    // init manage variable
    Hal_Mem_Set(&g_SettingDualSimMng, 0, sizeof(Setting_Dual_Setting_Mng_t));

    g_SettingDualSimMng.DefaultSim4Call    = (SETTING_DEFAULT_SERVICE_SIM)pNvPara->DualSimSetting.DefaultSim4Call;
    g_SettingDualSimMng.DefaultSim4Msg     = (SETTING_DEFAULT_SERVICE_SIM)pNvPara->DualSimSetting.DefaultSim4msg;
    g_SettingDualSimMng.DefaultSim4Standby = (SETTING_DEFAULT_SERVICE_SIM)pNvPara->DualSimSetting.DefaultSim4Standby;
    Hal_Mem_Copy(g_SettingDualSimMng.SimName[0], pNvPara->DualSimSetting.SimName[0], NV_SETTING_MAX_SIM_NAME_LEN);
    Hal_Mem_Copy(g_SettingDualSimMng.SimName[1], pNvPara->DualSimSetting.SimName[1], NV_SETTING_MAX_SIM_NAME_LEN);
}

/**
 * get dual standby status
 * param (in) void
 * return  UINT8: IF_SETTING_DUAL_STANDBY_STATUS
 */
UINT8 Setting_Get_Dual_Standby_Req(VOID)
{
    UINT8 Sim4Standby;

    if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
    {
        Sim4Standby = IF_SETTING_DUAL_SIM_STANDBY;
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        Sim4Standby = IF_SETTING_SIM_1_STANDBY;
    }
    else
    {
        Sim4Standby = IF_SETTING_SIM_2_STANDBY;
    }
    return(Sim4Standby);
}

/**
 * get sim name
 * param (in) SimId: MMI_MODEM_SIM_ID
 * return  IN8*
 */
INT8 *Setting_Get_Sim_Name_Req(MMI_MODEM_SIM_ID SimId)
{
    UINT8 SimNameLen;
    INT8  *SimName;

    if (MMI_MODEM_SIM_1 == SimId)
    {
        SimNameLen = strlen(g_SettingDualSimMng.SimName[0]);
        SimName    = Hal_Mem_Alloc(SimNameLen + 1);
        Hal_Mem_Set(SimName, 0, SimNameLen + 1);
        strcpy(SimName, g_SettingDualSimMng.SimName[0]);
    }
    else
    {
        SimNameLen = strlen(g_SettingDualSimMng.SimName[1]);
        SimName    = Hal_Mem_Alloc(SimNameLen + 1);
        Hal_Mem_Set(SimName, 0, SimNameLen + 1);
        strcpy(SimName, g_SettingDualSimMng.SimName[1]);
    }
    return(SimName);
}

/**
 * get default sim for specified service
 * param (in) ServiceType: IF_SETTING_SERVICE_TYPE
 * return  UINT8: IF_SETTING_DEFAULT_SIM
 */
IF_SETTING_DEFAULT_SIM Setting_Get_Default_Sim_Req(IF_SETTING_SERVICE_TYPE ServiceType)
{
    IF_SETTING_DEFAULT_SIM DefaultSim = IF_SETTING_ASK_EVERY_TIME;
        
    if (IF_SETTING_SERVICE_CALL == ServiceType)
    {
        if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Call)
        {
            DefaultSim = IF_SETTING_ASK_EVERY_TIME;
        }
        else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Call)
        {
            DefaultSim = IF_SETTING_DEFAULT_SIM_1;
        }
        else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Call)
        {
            DefaultSim = IF_SETTING_DEFAULT_SIM_2;
        }
    }
    else
    {
        if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Msg)
        {
            DefaultSim = IF_SETTING_ASK_EVERY_TIME;
        }
        else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Msg)
        {
            DefaultSim = IF_SETTING_DEFAULT_SIM_1;
        }
        else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Msg)
        {
            DefaultSim = IF_SETTING_DEFAULT_SIM_2;
        }
    }

    return(DefaultSim);
}

/**
 * change SIM name
 * param (in) NewName: INT8*
 * param (in) SimId: MMI_MODEM_SIM_ID
 * return  void:
 */
VOID Setting_Change_Sim_Name(MMI_MODEM_SIM_ID SimId, INT8 *NewName)
{
    UINT8                   DualSimSetting_SimId;
    Setting_Phone_Setting_t *PhoneSetting = NULL;
    UINT8                   nvData[NV_SETTING_DUAL_SETTING_LEN];
    UINT8                   i = 0;

    // compare new name and old name
    if (MMI_MODEM_SIM_1 == SimId)
    {
        DualSimSetting_SimId = 0;
    }
    else
    {
        DualSimSetting_SimId = 1;
    }
    if (0 == strcmp(NewName, g_SettingDualSimMng.SimName[DualSimSetting_SimId]))   // No change
    {
        return;
    }

    // change global variable
    Hal_Mem_Set(g_SettingDualSimMng.SimName[DualSimSetting_SimId], 0, NV_SETTING_MAX_SIM_NAME_LEN);
    Hal_Mem_Copy(g_SettingDualSimMng.SimName[DualSimSetting_SimId], NewName, NV_SETTING_MAX_SIM_NAME_LEN);

    for (i = 0; i < NV_SETTING_MAX_SIM_NAME_LEN; i++)
    {
        printf("SimName[%d] is %d,Setting_Change_Sim_Name/n",i,g_SettingDualSimMng.SimName[DualSimSetting_SimId][i]);
    }

    for (i = 0; i < NV_SETTING_MAX_SIM_NAME_LEN; i++)
    {
        printf("NewName[%d] is %d,Setting_Change_Sim_Name/n",i,NewName[i]);
    }

    PhoneSetting = (Setting_Phone_Setting_t *)Hal_Mem_Alloc(sizeof(Setting_Phone_Setting_t));
    Hal_Mem_Set(PhoneSetting, 0, sizeof(Setting_Phone_Setting_t));
    
    // name change ind
    if (0 == DualSimSetting_SimId)
    {
        PhoneSetting->ChangeMark = IF_SETTING_CHANGE_MARK_NAME_OF_SIM1;
        Hal_Mem_Set(PhoneSetting->NameOfSIM1, 0, NV_SETTING_MAX_SIM_NAME_LEN);
        Hal_Mem_Copy(PhoneSetting->NameOfSIM1, NewName, NV_SETTING_MAX_SIM_NAME_LEN);
    }
    else
    {
        PhoneSetting->ChangeMark = IF_SETTING_CHANGE_MARK_NAME_OF_SIM2;
        Hal_Mem_Set(PhoneSetting->NameOfSIM2, 0, NV_SETTING_MAX_SIM_NAME_LEN);
        Hal_Mem_Copy(PhoneSetting->NameOfSIM2, NewName, NV_SETTING_MAX_SIM_NAME_LEN);
    }
    Setting_Phone_Setting_Chg_Ind(PhoneSetting);

    // nv write
    nvData[0] = g_SettingDualSimMng.DefaultSim4Call;
    nvData[1] = g_SettingDualSimMng.DefaultSim4Msg;
    nvData[2] = g_SettingDualSimMng.DefaultSim4Standby;
    Hal_Mem_Copy(&nvData[3], g_SettingDualSimMng.SimName[0], NV_SETTING_MAX_SIM_NAME_LEN);
    Hal_Mem_Copy(&nvData[13], g_SettingDualSimMng.SimName[1], NV_SETTING_MAX_SIM_NAME_LEN);
    UI_NV_Write_Req(NV_SECTION_UI_SETTINGS, NV_SETTING_DUAL_SETTING_OFFSET, NV_SETTING_DUAL_SETTING_LEN, nvData);
} /* Setting_Change_Sim_Name */

/**
 * Set default SIM for call or sms
 * param (in) ServiceType: SETTING_SERVICE_TYPE
 * param (in) DefaultSim: SETTING_DEFAULT_SERVICE_SIM
 * return void:
 */
VOID Setting_Set_Default_SIM(SETTING_SERVICE_TYPE ServiceType, SETTING_DEFAULT_SERVICE_SIM DefaultSim)
{
    UINT8 nvData[NV_SETTING_DUAL_SETTING_LEN];
    BOOL  ChgFlg = FALSE;

    // change global variable
    if (IF_SETTING_SERVICE_CALL == ServiceType)
    {
        if (DefaultSim != g_SettingDualSimMng.DefaultSim4Call)
        {
            g_SettingDualSimMng.DefaultSim4Call = DefaultSim;
            ChgFlg                              = TRUE;
        }
    }
    else
    {
        if (DefaultSim != g_SettingDualSimMng.DefaultSim4Msg)
        {
            g_SettingDualSimMng.DefaultSim4Msg = DefaultSim;
            ChgFlg                             = TRUE;
        }
    }

    // nv write
    if (TRUE == ChgFlg)
    {
        nvData[0] = g_SettingDualSimMng.DefaultSim4Call;
        nvData[1] = g_SettingDualSimMng.DefaultSim4Msg;
        nvData[2] = g_SettingDualSimMng.DefaultSim4Standby;
        Hal_Mem_Copy(&nvData[3], g_SettingDualSimMng.SimName[0], NV_SETTING_MAX_SIM_NAME_LEN);
        Hal_Mem_Copy(&nvData[13], g_SettingDualSimMng.SimName[1], NV_SETTING_MAX_SIM_NAME_LEN);
        UI_NV_Write_Req(NV_SECTION_UI_SETTINGS, NV_SETTING_DUAL_SETTING_OFFSET, NV_SETTING_DUAL_SETTING_LEN, nvData);
    }
}

/**
 * Set standby mode
 * param (in) DefaultSim: SETTING_DEFAULT_DULT_SIM
 * return void:
 */
VOID Setting_Set_Standby_Mode(SETTING_DEFAULT_SERVICE_SIM Sim4Standby)
{
    UINT8                   nvData[NV_SETTING_DUAL_SETTING_LEN];

    // compare with old setting
    if (g_SettingDualSimMng.DefaultSim4Standby == Sim4Standby)
    {
        return;
    }

    // change global variable
    g_SettingDualSimMng.DefaultSim4Standby = Sim4Standby;
    printf("%s:Sim4Standgy = %d\n", __FUNCTION__, Sim4Standby);

    // nv write
    nvData[0] = g_SettingDualSimMng.DefaultSim4Call;
    nvData[1] = g_SettingDualSimMng.DefaultSim4Msg;
    nvData[2] = g_SettingDualSimMng.DefaultSim4Standby;
    Hal_Mem_Copy(&nvData[3], g_SettingDualSimMng.SimName[0], NV_SETTING_MAX_SIM_NAME_LEN);
    Hal_Mem_Copy(&nvData[13], g_SettingDualSimMng.SimName[1], NV_SETTING_MAX_SIM_NAME_LEN);
    UI_NV_Write_Req(NV_SECTION_UI_SETTINGS, NV_SETTING_DUAL_SETTING_OFFSET, NV_SETTING_DUAL_SETTING_LEN, nvData);
}

/**
 *
 * Callback of Setting_Dual_Default_Sim, on destroy
 * param (in) NormalLstOnlyDesc: UI_Normal_List_Only_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Destroy(VOID *pPara)
{
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc = NULL;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)pPara;
    Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList);
    Hal_Mem_Free(NormalLstOnlyDesc);
}

/**
 *
 * Callback of Setting_Dual_Default_Sim_Done, for calls, on create
 * param (in) NormalNoTitleDesc: UI_Normal_NoTitle_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Done_for_calls_Create(VOID *pPara)
{
    INT8                     LabelValue[100];
    UINT8                    LabelLen;
    INT8                     Text[50];
    UINT8                    TextLen;
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc = NULL;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)pPara;

    Hal_Mem_Set(LabelValue, 0, 100);
    Hal_Mem_Set(Text, 0, 50);
    strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_DEFSIM_CALLS));
    TextLen = strlen(Text);
    Hal_Mem_Copy(LabelValue, Text, TextLen);
    LabelValue[TextLen++] = ':';
    LabelValue[TextLen++] = ' ';
    LabelLen              = TextLen;

    Hal_Mem_Set(Text, 0, 50);
    if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Call)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_ASK_EVE_TIME));
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Call)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_SIM1));
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Call)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_SIM2));
    }
    TextLen = strlen(Text);
    Hal_Mem_Copy(&LabelValue[LabelLen], Text, TextLen);
    LabelLen              += TextLen;
    LabelValue[LabelLen++] = '\n';

    Hal_Mem_Set(Text, 0, 50);
    strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_CALL_DIRECTLY));
    TextLen = strlen(Text);
    Hal_Mem_Copy(&LabelValue[LabelLen], Text, TextLen);
    LabelLen += TextLen;

    lv_label_set_text(NormalNoTitleDesc->ContenCont.ContLabel.Label, LabelValue);
} /* Display_Setting_Dual_Default_Sim_Done_for_calls_Create */

/**
 *
 * Callback of Setting_Dual_Default_Sim_Done, on destroy
 * param (in) NormalNoTitleDesc: UI_Normal_NoTitle_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Done_Destroy(VOID *NormalNoTitleDesc)
{
    Hal_Mem_Free(NormalNoTitleDesc);
}

/**
 *
 * Callback of Setting_Dual_Default_Sim_Done, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Default_Sim_Done_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_OK == key_val)
    {
        Nav_Forward(ACT_ID_SETTING_DUAL_DEFAULT_SIM_DONE, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Setting_Dual_Default_Sim_Done, for calls
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Done_for_calls(VOID)
{
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc;
    Nav_Func_List_t          FuncList;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_NoTitle_Desc_t));
    Hal_Mem_Set(NormalNoTitleDesc, 0, sizeof(UI_Normal_NoTitle_Desc_t));

    NormalNoTitleDesc->ContenCont.ContLabel.TxtId      = PHONE_TEXT_ID_DEFSIM_CALLS;
    NormalNoTitleDesc->ContenCont.ContLabel.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    NormalNoTitleDesc->ContenCont.ContLabel.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    NormalNoTitleDesc->ButtonBar.ButtonL.Valid = FALSE;
    NormalNoTitleDesc->ButtonBar.ButtonM.Valid = TRUE;
    NormalNoTitleDesc->ButtonBar.ButtonM.TxtId = PHONE_TEXT_ID_OK;
    NormalNoTitleDesc->ButtonBar.ButtonR.Valid = FALSE;
    NormalNoTitleDesc->KeyFunc                 = Display_Setting_Dual_Default_Sim_Done_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_NoTitle_Create;
    FuncList.OnCreate  = Display_Setting_Dual_Default_Sim_Done_for_calls_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Default_Sim_Done_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalNoTitleDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_DEFAULT_SIM,ACT_ID_SETTING_DUAL_DEFAULT_SIM_DONE, &FuncList, (VOID *)NormalNoTitleDesc);
}

VOID Display_Setting_Dual_Default_Sim_Done_for_calls_AET_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;

        Setting_Set_Default_SIM(SETTING_SERVICE_CALL, SETTING_ASK_EVERY_TIME);

        Display_Setting_Dual_Default_Sim_Done_for_calls();
    }
}

VOID Display_Setting_Dual_Default_Sim_Done_for_calls_Sim1_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;

        Setting_Set_Default_SIM(SETTING_SERVICE_CALL, SETTING_DEFAULT_SIM1);

        Display_Setting_Dual_Default_Sim_Done_for_calls();
    }
}

VOID Display_Setting_Dual_Default_Sim_Done_for_calls_Sim2_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;

        Setting_Set_Default_SIM(SETTING_SERVICE_CALL, SETTING_DEFAULT_SIM2);

        Display_Setting_Dual_Default_Sim_Done_for_calls();
    }
}

/**
 *
 * Callback of Setting_Dual_Default_Sim_Done, for msgs, on create
 * param (in) NormalNoTitleDesc: UI_Normal_NoTitle_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Done_for_msgs_Create(VOID *pPara)
{
    INT8                     LabelValue[100];
    UINT8                    LabelLen;
    INT8                     Text[50];
    UINT8                    TextLen;
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc = NULL;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)pPara;

    Hal_Mem_Set(LabelValue, 0, 100);
    Hal_Mem_Set(Text, 0, 50);
    strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_DEFSIM_SMS));
    TextLen = strlen(Text);
    Hal_Mem_Copy(LabelValue, Text, TextLen);
    LabelValue[TextLen++] = ':';
    LabelValue[TextLen++] = ' ';
    LabelLen              = TextLen;

    Hal_Mem_Set(Text, 0, 50);
    if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Msg)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_ASK_EVE_TIME));
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Msg)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_SIM1));
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Msg)
    {
        strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_SIM2));
    }
    TextLen = strlen(Text);
    Hal_Mem_Copy(&LabelValue[LabelLen], Text, TextLen);
    LabelLen              += TextLen;
    LabelValue[LabelLen++] = '\n';

    Hal_Mem_Set(Text, 0, 50);
    strcpy(Text, lv_lang_get_text(PHONE_TEXT_ID_SEND_SMS_DIRECTLY));
    TextLen = strlen(Text);
    Hal_Mem_Copy(&LabelValue[LabelLen], Text, TextLen);
    LabelLen += TextLen;

    lv_label_set_text(NormalNoTitleDesc->ContenCont.ContLabel.Label, LabelValue);
} /* Display_Setting_Dual_Default_Sim_Done_for_msgs_Create */

/**
 * display Setting_Dual_Default_Sim_Done, for msgs
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_Done_for_msgs(VOID)
{
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc;
    Nav_Func_List_t          FuncList;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_NoTitle_Desc_t));
    Hal_Mem_Set(NormalNoTitleDesc, 0, sizeof(UI_Normal_NoTitle_Desc_t));

    NormalNoTitleDesc->ContenCont.ContLabel.TxtId      = PHONE_TEXT_ID_DEFSIM_SMS;
    NormalNoTitleDesc->ContenCont.ContLabel.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    NormalNoTitleDesc->ContenCont.ContLabel.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    NormalNoTitleDesc->ButtonBar.ButtonL.Valid = FALSE;
    NormalNoTitleDesc->ButtonBar.ButtonM.Valid = TRUE;
    NormalNoTitleDesc->ButtonBar.ButtonM.TxtId = PHONE_TEXT_ID_OK;
    NormalNoTitleDesc->ButtonBar.ButtonR.Valid = FALSE;
    NormalNoTitleDesc->KeyFunc                 = Display_Setting_Dual_Default_Sim_Done_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_NoTitle_Create;
    FuncList.OnCreate  = Display_Setting_Dual_Default_Sim_Done_for_msgs_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Default_Sim_Done_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalNoTitleDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_DEFAULT_SIM,ACT_ID_SETTING_DUAL_DEFAULT_SIM_DONE, &FuncList, (VOID *)NormalNoTitleDesc);
}

VOID Display_Setting_Dual_Default_Sim_Done_for_msgs_AET_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;

        Setting_Set_Default_SIM(SETTING_SERVICE_SMS, SETTING_ASK_EVERY_TIME);

        Display_Setting_Dual_Default_Sim_Done_for_msgs();
    }
}

VOID Display_Setting_Dual_Default_Sim_Done_for_msgs_Sim1_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;

        Setting_Set_Default_SIM(SETTING_SERVICE_SMS, SETTING_DEFAULT_SIM1);

        Display_Setting_Dual_Default_Sim_Done_for_msgs();
    }
}

VOID Display_Setting_Dual_Default_Sim_Done_for_msgs_Sim2_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

        pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

        pNormalContLstDesc->ContList.ContainerList[pNormalContLstDesc->ContList.Index].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;

        Setting_Set_Default_SIM(SETTING_SERVICE_SMS, SETTING_DEFAULT_SIM2);

        Display_Setting_Dual_Default_Sim_Done_for_msgs();
    }
}

/**
 *
 * Callback of Setting_Dual_Default_Sim, for calls, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Default_Sim_for_calls_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_SOFTRIGHT == key_val)   // BACK
    {
        Nav_Back(ACT_ID_SETTING_DUAL_DEFAULT_SIM);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Settings_Dual_Default_Sim for calls
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_for_calls(VOID)
{
    // Default SIM for calls
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;
    Nav_Func_List_t            FuncList;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_List_Only_Desc_t));
    Hal_Mem_Set(NormalLstOnlyDesc, 0, sizeof(UI_Normal_List_Only_Desc_t));

    NormalLstOnlyDesc->TitleBar.TxtId      = PHONE_TEXT_ID_DEFSIM_CALLS;
    NormalLstOnlyDesc->TitleBar.TxtAlign   = LV_LABEL_ALIGN_CENTER;
    NormalLstOnlyDesc->TitleBar.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Call)
    {
        NormalLstOnlyDesc->List.Index = 0;
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Call)
    {
        NormalLstOnlyDesc->List.Index = 1;
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Call)
    {
        NormalLstOnlyDesc->List.Index = 2;
    }
    NormalLstOnlyDesc->List.ListButtonCnt = 3;
    NormalLstOnlyDesc->List.ButtonList    = (UI_Button_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Button_Desc_t) * 3);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList, 0, sizeof(UI_Button_Desc_t) * 3);

    NormalLstOnlyDesc->List.ButtonList[0].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[0].ButtonIndex = 0;
    NormalLstOnlyDesc->List.ButtonList[0].TxtId       = PHONE_TEXT_ID_ASK_EVE_TIME;
    NormalLstOnlyDesc->List.ButtonList[0].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_calls_AET_Cb;
    NormalLstOnlyDesc->List.ButtonList[1].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[1].ButtonIndex = 1;
    NormalLstOnlyDesc->List.ButtonList[1].TxtId       = PHONE_TEXT_ID_SIM1;
    NormalLstOnlyDesc->List.ButtonList[1].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_calls_Sim1_Cb;
    NormalLstOnlyDesc->List.ButtonList[2].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[2].ButtonIndex = 2;
    NormalLstOnlyDesc->List.ButtonList[2].TxtId       = PHONE_TEXT_ID_SIM2;
    NormalLstOnlyDesc->List.ButtonList[2].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_calls_Sim2_Cb;

    NormalLstOnlyDesc->BtnBar.ButtonL.Valid = FALSE;
    NormalLstOnlyDesc->BtnBar.ButtonM.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonM.TxtId = PHONE_TEXT_ID_SELECT;
    NormalLstOnlyDesc->BtnBar.ButtonR.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonR.TxtId = PHONE_TEXT_ID_BACK;

    NormalLstOnlyDesc->KeyFunc = Display_Setting_Dual_Default_Sim_for_calls_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_List_Only_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Default_Sim_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalLstOnlyDesc;
    Nav_Forward(ACT_ID_ANY,ACT_ID_SETTING_DUAL_DEFAULT_SIM, &FuncList, (VOID *)NormalLstOnlyDesc);
} /* Display_Setting_Dual_Default_Sim_for_calls */

/**
 * Callback Function of Settings_Dual_Default_Sim for calls
 * param (in) Btn: lv_obj_t*
 * param (in) Event: lv_event_t
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_for_calls_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Display_Setting_Dual_Default_Sim_for_calls();
    }
}

/**
 *
 * Callback of Setting_Dual_Default_Sim, for msgs, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Default_Sim_for_msgs_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_SOFTRIGHT == key_val)   // BACK
    {
        Nav_Back(ACT_ID_SETTING_DUAL_DEFAULT_SIM);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Settings_Dual_Default_Sim for msgs
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_for_msgs(VOID)
{
    // Default SIM for calls
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;
    Nav_Func_List_t            FuncList;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_List_Only_Desc_t));
    Hal_Mem_Set(NormalLstOnlyDesc, 0, sizeof(UI_Normal_List_Only_Desc_t));

    NormalLstOnlyDesc->TitleBar.TxtId      = PHONE_TEXT_ID_DEFSIM_SMS;
    NormalLstOnlyDesc->TitleBar.TxtAlign   = LV_LABEL_ALIGN_CENTER;
    NormalLstOnlyDesc->TitleBar.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Msg)
    {
        NormalLstOnlyDesc->List.Index = 0;
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Msg)
    {
        NormalLstOnlyDesc->List.Index = 1;
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Msg)
    {
        NormalLstOnlyDesc->List.Index = 2;
    }
    NormalLstOnlyDesc->List.ListButtonCnt = 3;
    NormalLstOnlyDesc->List.ButtonList    = (UI_Button_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Button_Desc_t) * 3);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList, 0, sizeof(UI_Button_Desc_t) * 3);

    NormalLstOnlyDesc->List.ButtonList[0].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[0].ButtonIndex = 0;
    NormalLstOnlyDesc->List.ButtonList[0].TxtId       = PHONE_TEXT_ID_ASK_EVE_TIME;
    NormalLstOnlyDesc->List.ButtonList[0].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_msgs_AET_Cb;
    NormalLstOnlyDesc->List.ButtonList[1].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[1].ButtonIndex = 1;
    NormalLstOnlyDesc->List.ButtonList[1].TxtId       = PHONE_TEXT_ID_SIM1;
    NormalLstOnlyDesc->List.ButtonList[1].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_msgs_Sim1_Cb;
    NormalLstOnlyDesc->List.ButtonList[2].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[2].ButtonIndex = 2;
    NormalLstOnlyDesc->List.ButtonList[2].TxtId       = PHONE_TEXT_ID_SIM2;
    NormalLstOnlyDesc->List.ButtonList[2].ReleaseFun  = Display_Setting_Dual_Default_Sim_Done_for_msgs_Sim2_Cb;

    NormalLstOnlyDesc->BtnBar.ButtonL.Valid = FALSE;
    NormalLstOnlyDesc->BtnBar.ButtonM.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonM.TxtId = PHONE_TEXT_ID_SELECT;
    NormalLstOnlyDesc->BtnBar.ButtonR.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonR.TxtId = PHONE_TEXT_ID_BACK;

    NormalLstOnlyDesc->KeyFunc = Display_Setting_Dual_Default_Sim_for_msgs_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_List_Only_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Default_Sim_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalLstOnlyDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_SIM_SETTINGS, ACT_ID_SETTING_DUAL_DEFAULT_SIM, &FuncList, (VOID *)NormalLstOnlyDesc);
} /* Display_Setting_Dual_Default_Sim_for_msgs */

/**
 * Callback Function of Settings_Dual_Default_Sim for msgs
 * param (in) Btn: lv_obj_t*
 * param (in) Event: lv_event_t
 * return void:
 */
VOID Display_Setting_Dual_Default_Sim_for_msgs_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Display_Setting_Dual_Default_Sim_for_msgs();
    }
}

/**
 *
 * Callback of Setting_Dual_Standby_Active, on destroy
 * param (in) NormalNoTitleDesc: UI_Normal_NoTitle_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Standby_Active_Destroy(VOID *NormalNoTitleDesc)
{
    Hal_Mem_Free(NormalNoTitleDesc);
}

/**
 *
 * Callback of Setting_Dual_Standby_Active, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Standby_Active_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_OK == key_val)
    {
        Display_Setting_Dual_Sim_Settings_UI_Parameter_Select(g_SettingDualSimMng.DefaultSim4Standby);
        Nav_Forward(ACT_ID_SETTING_DUAL_STANDBY_ACTIVE, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Settings_Dual_Standby_Active
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Standby_Active(VOID)
{
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc;
    Nav_Func_List_t          FuncList;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_NoTitle_Desc_t));
    Hal_Mem_Set(NormalNoTitleDesc, 0, sizeof(UI_Normal_NoTitle_Desc_t));

    NormalNoTitleDesc->ContenCont.ContLabel.TxtId      = PHONE_TEXT_ID_SUAL_SIM_ACT;
    NormalNoTitleDesc->ContenCont.ContLabel.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    NormalNoTitleDesc->ContenCont.ContLabel.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    NormalNoTitleDesc->ButtonBar.ButtonL.Valid = FALSE;
    NormalNoTitleDesc->ButtonBar.ButtonM.Valid = TRUE;
    NormalNoTitleDesc->ButtonBar.ButtonM.TxtId = PHONE_TEXT_ID_OK;
    NormalNoTitleDesc->ButtonBar.ButtonR.Valid = FALSE;
    NormalNoTitleDesc->KeyFunc                 = Display_Setting_Dual_Standby_Active_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_NoTitle_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Standby_Active_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalNoTitleDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_STANDBY_MODE,ACT_ID_SETTING_DUAL_STANDBY_ACTIVE, &FuncList, (VOID *)NormalNoTitleDesc);
}

VOID Display_Setting_Dual_Standby_Active_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Setting_Phone_Setting_t *PhoneSetting = NULL;

        printf("%s:DefaultSim4Standby = %d\n", __FUNCTION__, g_SettingDualSimMng.DefaultSim4Standby);
        if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
        {   // return to UI Setting_Dual_Sim_Settings
            Nav_Forward(ACT_ID_ANY, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        }
        else
        {
            // set standby mode
            Setting_Set_Standby_Mode(SETTING_DEFAULT_DULT_SIM);

            // inform framework
            PhoneSetting = (Setting_Phone_Setting_t *)Hal_Mem_Alloc(sizeof(Setting_Phone_Setting_t));
            Hal_Mem_Set(PhoneSetting, 0, sizeof(Setting_Phone_Setting_t));
        
            PhoneSetting->ChangeMark |= IF_SETTING_CHANGE_MARK_DUAL_STAND_BY;
            PhoneSetting->DualStandby = IF_SETTING_DUAL_SIM_STANDBY;
            Setting_Phone_Setting_Chg_Ind(PhoneSetting);

            Display_Setting_Dual_Standby_Active();
        }
    }
}

/**
 *
 * Callback of Settings_Dual_Standby_Disconnecting, on destroy
 * param (in) StatusDesc: UI_Status_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Standby_Disconnecting_Destroy(VOID *StatusDesc)
{
    Hal_Mem_Free(StatusDesc);
}

/**
 * display Settings_Dual_Standby_Disconnecting
 * param (in) TxtId: UNIT16
 * return void:
 */
VOID Display_Setting_Dual_Standby_Disconnecting(UINT16 TxtId)
{
    UI_Status_Desc_t *StatusDesc;
    Nav_Func_List_t  FuncList;

    StatusDesc = (UI_Status_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Status_Desc_t));
    Hal_Mem_Set(StatusDesc, 0, sizeof(UI_Status_Desc_t));

    StatusDesc->ContLabel.TxtId      = TxtId;
    StatusDesc->ContLabel.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    StatusDesc->ContLabel.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
    StatusDesc->ContImg.Img          = NULL;
    StatusDesc->ContLabelAlign       = LV_ALIGN_IN_TOP_LEFT;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Status_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Standby_Disconnecting_Destroy;

    Nav_Forward(ACT_ID_SETTING_DUAL_STANDBY_MODE,ACT_ID_SETTING_DUAL_STANDBY_DISCONNECTING, &FuncList, (VOID *)StatusDesc);
}

VOID Display_Setting_Dual_Standby_Disconnecting1_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Setting_Phone_Setting_t         *PhoneSetting = NULL;

        printf("%s:DefaultSim4Standby = %d\n", __FUNCTION__, g_SettingDualSimMng.DefaultSim4Standby);
        if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
        {   // return to UI Setting_Dual_Sim_Settings
            Nav_Forward(ACT_ID_ANY, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        }
        else
        {
            printf("Dual standby mode change to SIM1 in Display_Setting_Dual_Standby_Disconnecting1_Cb\n");

            Display_Setting_Dual_Standby_Disconnecting(PHONE_TEXT_ID_DISCON_SIM1);

            // set standby mode
            Setting_Set_Standby_Mode(SETTING_DEFAULT_SIM1);

            // inform framework
            PhoneSetting = (Setting_Phone_Setting_t *)Hal_Mem_Alloc(sizeof(Setting_Phone_Setting_t));
            Hal_Mem_Set(PhoneSetting, 0, sizeof(Setting_Phone_Setting_t));

            PhoneSetting->ChangeMark |= IF_SETTING_CHANGE_MARK_DUAL_STAND_BY;
            PhoneSetting->DualStandby = IF_SETTING_SIM_1_STANDBY;
            Setting_Phone_Setting_Chg_Ind(PhoneSetting);
        }
    }
}

VOID Display_Setting_Dual_Standby_Disconnecting2_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Setting_Phone_Setting_t         *PhoneSetting = NULL;

        printf("%s:DefaultSim4Standby = %d\n", __FUNCTION__, g_SettingDualSimMng.DefaultSim4Standby);
        if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Standby)
        {   // return to UI Setting_Dual_Sim_Settings
            Nav_Forward(ACT_ID_ANY, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        }
        else
        {
            printf("Dual standby mode change to SIM2 in Display_Setting_Dual_Standby_Disconnecting2_Cb\n");

            Display_Setting_Dual_Standby_Disconnecting(PHONE_TEXT_ID_DISCON_SIM2);

            // set standby mode
            Setting_Set_Standby_Mode(SETTING_DEFAULT_SIM2);

            // inform framework
            PhoneSetting = (Setting_Phone_Setting_t *)Hal_Mem_Alloc(sizeof(Setting_Phone_Setting_t));
            Hal_Mem_Set(PhoneSetting, 0, sizeof(Setting_Phone_Setting_t));

            PhoneSetting->ChangeMark |= IF_SETTING_CHANGE_MARK_DUAL_STAND_BY;
            PhoneSetting->DualStandby = IF_SETTING_SIM_2_STANDBY;
            Setting_Phone_Setting_Chg_Ind(PhoneSetting);
        }
    }
}

/**
 *
 * Callback of Setting_Dual_Standby_Mode, on destroy
 * param (in) NormalLstOnlyDesc: UI_Normal_List_Only_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Standby_Mode_Destroy(VOID *pPara)
{
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc = NULL;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)pPara;

    Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList);
    Hal_Mem_Free(NormalLstOnlyDesc);
}

/**
 *
 * Callback of Setting_Dual_Standby_Mode, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Standby_Mode_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_SOFTRIGHT == key_val)
    {
        Nav_Back(ACT_ID_SETTING_DUAL_STANDBY_MODE);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Setting_Dual_Standby_Mode
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Standby_Mode(VOID)
{
    // Standby mode
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;
    Nav_Func_List_t            FuncList;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_List_Only_Desc_t));
    Hal_Mem_Set(NormalLstOnlyDesc, 0, sizeof(UI_Normal_List_Only_Desc_t));

    NormalLstOnlyDesc->TitleBar.TxtId      = PHONE_TEXT_ID_STANDBY_MODE;
    NormalLstOnlyDesc->TitleBar.TxtAlign   = LV_LABEL_ALIGN_CENTER;
    NormalLstOnlyDesc->TitleBar.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
    {
        NormalLstOnlyDesc->List.Index = 0;
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        NormalLstOnlyDesc->List.Index = 1;
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        NormalLstOnlyDesc->List.Index = 2;
    }
    NormalLstOnlyDesc->List.ListButtonCnt = 3;
    NormalLstOnlyDesc->List.ButtonList    = (UI_Button_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Button_Desc_t) * 3);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList, 0, sizeof(UI_Button_Desc_t) * 3);

    NormalLstOnlyDesc->List.ButtonList[0].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[0].ButtonIndex = 0;
    NormalLstOnlyDesc->List.ButtonList[0].TxtId       = PHONE_TEXT_ID_DUAL_SIM;
    NormalLstOnlyDesc->List.ButtonList[0].ReleaseFun  = Display_Setting_Dual_Standby_Active_Cb;
    NormalLstOnlyDesc->List.ButtonList[1].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[1].ButtonIndex = 1;
    NormalLstOnlyDesc->List.ButtonList[1].TxtId       = PHONE_TEXT_ID_SIM1;
    NormalLstOnlyDesc->List.ButtonList[1].ReleaseFun  = Display_Setting_Dual_Standby_Disconnecting1_Cb;
    NormalLstOnlyDesc->List.ButtonList[2].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[2].ButtonIndex = 2;
    NormalLstOnlyDesc->List.ButtonList[2].TxtId       = PHONE_TEXT_ID_SIM2;
    NormalLstOnlyDesc->List.ButtonList[2].ReleaseFun  = Display_Setting_Dual_Standby_Disconnecting2_Cb;

    NormalLstOnlyDesc->BtnBar.ButtonL.Valid = FALSE;
    NormalLstOnlyDesc->BtnBar.ButtonM.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonM.TxtId = PHONE_TEXT_ID_SELECT;
    NormalLstOnlyDesc->BtnBar.ButtonR.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonR.TxtId = PHONE_TEXT_ID_BACK;

    NormalLstOnlyDesc->KeyFunc = Display_Setting_Dual_Standby_Mode_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_List_Only_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Standby_Mode_Destroy;

    Nav_Forward(ACT_ID_SETTING_DUAL_SIM_SETTINGS,ACT_ID_SETTING_DUAL_STANDBY_MODE, &FuncList, (VOID *)NormalLstOnlyDesc);
} /* Display_Setting_Dual_Standby_Mode */

/**
 * Callback Function of Setting_Dual_Standby_Mode
 * param (in) Btn: lv_obj_t*
 * param (in) Event: lv_event_t
 * return void:
 */
VOID Display_Setting_Dual_Standby_Mode_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Display_Setting_Dual_Standby_Mode();
    }
}

/**
 *
 * Callback of Settings_Dual_Standby_Connection_Ended, on destroy
 * param (in) NormalNoTitleDesc: UI_Normal_NoTitle_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Standby_Connection_Ended_Destroy(VOID *NormalNoTitleDesc)
{
    Hal_Mem_Free(NormalNoTitleDesc);
}

/**
 *
 * Callback of Settings_Dual_Standby_Connection_Ended, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Standby_Connection_Ended_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_OK == key_val)
    {
        Display_Setting_Dual_Sim_Settings_UI_Parameter_Select(g_SettingDualSimMng.DefaultSim4Standby);
        Nav_Forward(ACT_ID_SETTING_DUAL_STANDBY_CONNECTION_ENDED, ACT_ID_SETTING_DUAL_SIM_SETTINGS, NULL, NULL);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Settings_Dual_Standby_Connection_Ended
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Standby_Connection_Ended(VOID)
{
    UI_Normal_NoTitle_Desc_t *NormalNoTitleDesc;
    Nav_Func_List_t          FuncList;

    NormalNoTitleDesc = (UI_Normal_NoTitle_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_NoTitle_Desc_t));
    Hal_Mem_Set(NormalNoTitleDesc, 0, sizeof(UI_Normal_NoTitle_Desc_t));

    if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        NormalNoTitleDesc->ContenCont.ContLabel.TxtId = PHONE_TEXT_ID_SIM2_CONNECTION_ENDED;
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        NormalNoTitleDesc->ContenCont.ContLabel.TxtId = PHONE_TEXT_ID_SIM1_CONNECTION_ENDED;
    }
    NormalNoTitleDesc->ContenCont.ContLabel.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    NormalNoTitleDesc->ContenCont.ContLabel.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    NormalNoTitleDesc->ButtonBar.ButtonL.Valid = FALSE;
    NormalNoTitleDesc->ButtonBar.ButtonM.Valid = TRUE;
    NormalNoTitleDesc->ButtonBar.ButtonM.TxtId = PHONE_TEXT_ID_OK;
    NormalNoTitleDesc->ButtonBar.ButtonR.Valid = FALSE;
    NormalNoTitleDesc->KeyFunc                 = Display_Setting_Dual_Standby_Connection_Ended_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_NoTitle_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Standby_Connection_Ended_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalNoTitleDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_STANDBY_DISCONNECTING,ACT_ID_SETTING_DUAL_STANDBY_CONNECTION_ENDED, &FuncList, (VOID *)NormalNoTitleDesc);
}

/**
 * response of Setting_Dual_Standby_Change_Ind
 * param (in) void
 * return  void
 */
VOID Setting_Dual_Standby_Change_Resp(VOID)
{
    Display_Setting_Dual_Standby_Connection_Ended();
}

/**
 *
 * Callback of Settings_Dual_Sim_Name_Edit, on create
 * param (in) NormalNoTitleLblTaDesc: UI_Normal_NoTitle_Label_Ta_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Edit_Create(VOID *pPara)
{
    INT8                              LabelValue[3] = { 0, 0, 0 };
    UINT8                             SimNameLen;
    UI_Normal_NoTitle_Label_Ta_Desc_t *NormalNoTitleLblTaDesc = NULL;

    NormalNoTitleLblTaDesc = (UI_Normal_NoTitle_Label_Ta_Desc_t *)pPara;

    g_SettingDualSimNameTaRestCharacters = NV_SETTING_MAX_SIM_NAME_LEN - 1;

    // Update the rest input characters on count label
    // SimNameLen                            = strlen(g_SettingDualSimMng.SimName[g_SettingDualSimSelected - 1]);
    SimNameLen                            = strlen(lv_textarea_get_text(NormalNoTitleLblTaDesc->ContTa.TextArea));
    g_SettingDualSimNameTaRestCharacters -= SimNameLen;

    if (g_SettingDualSimNameTaRestCharacters > 9)
    {
        LabelValue[0] = g_SettingDualSimNameTaRestCharacters / 10 + 0x30;
        LabelValue[1] = g_SettingDualSimNameTaRestCharacters % 10 + 0x30;
    }
    else
    {
        LabelValue[0] = g_SettingDualSimNameTaRestCharacters + 0x30;
    }
    lv_label_set_text(NormalNoTitleLblTaDesc->ContLabelTr.Label, LabelValue);

    // set max length of TA
    lv_textarea_set_max_length(NormalNoTitleLblTaDesc->ContTa.TextArea, NV_SETTING_MAX_SIM_NAME_LEN - 1);
}

/**
 *
 * Callback of Settings_Dual_Sim_Name_Edit, on destroy
 * param (in) NormalNoTitleLblTaDesc: UI_Normal_NoTitle_Label_Ta_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Edit_Destroy(VOID *pPara)
{
    UI_Normal_NoTitle_Label_Ta_Desc_t *NormalNoTitleLblTaDesc = NULL;

    NormalNoTitleLblTaDesc = (UI_Normal_NoTitle_Label_Ta_Desc_t *)pPara;

    Hal_Mem_Free(NormalNoTitleLblTaDesc->ContTa.TaTxt);
    Hal_Mem_Free(NormalNoTitleLblTaDesc);
}

/**
 *
 * Callback of Settings_Dual_Sim_Name_Edit, on restore state
 * param (in) NormalNoTitleLblTaDesc: UI_Normal_NoTitle_Label_Ta_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Edit_RestoreState(VOID *NormalNoTitleLblTaDesc)
{
    gp_SettingDualSimSettingCurNormalNoTitleLblTaUIDesc = (VOID *)NormalNoTitleLblTaDesc;
}

/**
 *
 * Callback of Settings_Dual_Sim_Name_Edit, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Sim_Name_Edit_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    INT8                              LabelValue[3]           = { 0, 0, 0 };
    INT8                              *Text                   = NULL;
    UINT8                             Len                     = 0;
    UI_Normal_NoTitle_Label_Ta_Desc_t *NormalNoTitleLblTaDesc = NULL;
    UI_Normal_List_Only_Desc_t        *NormalLstOnlyDesc      = NULL;

    NormalNoTitleLblTaDesc = (UI_Normal_NoTitle_Label_Ta_Desc_t *)gp_SettingDualSimSettingCurNormalNoTitleLblTaUIDesc;
    NormalLstOnlyDesc      = (UI_Normal_List_Only_Desc_t *)gp_SettingDualSimSettingCurListOnlyUIDesc;

    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    switch (key_val)
    {
    case KEY_OK:
        Text = (INT8 *)lv_textarea_get_text(NormalNoTitleLblTaDesc->ContTa.TextArea);
        Len  = strlen(Text);
        if (0 == strlen(Text))
        {
            Display_Setting_Error(ACT_ID_SETTING_DUAL_SIM_NAME_EDIT, PHONE_TEXT_ID_SIM_NAME_EMPTY, ACT_ID_SETTING_DUAL_SIM_NAME_EDIT, TRUE);
        }
        else
        {
            if (1 == g_SettingDualSimSelected)
            {
                Len = strlen(Text) + 1;

                Setting_Change_Sim_Name(MMI_MODEM_SIM_1, Text);

                Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList[0].BtnTxt);
                NormalLstOnlyDesc->List.ButtonList[0].BtnTxt = (INT8 *)Hal_Mem_Alloc(Len);
                Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList[0].BtnTxt, 0, Len);
                Hal_Mem_Copy(NormalLstOnlyDesc->List.ButtonList[0].BtnTxt, Text, Len);
            }
            else
            {
                Len = strlen(Text) + 1;

                Setting_Change_Sim_Name(MMI_MODEM_SIM_2, Text);

                Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList[1].BtnTxt);
                NormalLstOnlyDesc->List.ButtonList[1].BtnTxt = (INT8 *)Hal_Mem_Alloc(Len);
                Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList[1].BtnTxt, 0, Len);
                Hal_Mem_Copy(NormalLstOnlyDesc->List.ButtonList[1].BtnTxt, Text, Len);
            }
            Display_Setting_Done(ACT_ID_SETTING_DUAL_SIM_NAME_EDIT,PHONE_TEXT_ID_SETTINGS_SAVED,ACT_ID_SETTING_DUAL_SIM_NAME);
        }
        return(1);

    case KEY_SOFTRIGHT:     // CLEAR
        if (g_SettingDualSimNameTaRestCharacters < NV_SETTING_MAX_SIM_NAME_LEN - 1)
        {
            g_SettingDualSimNameTaRestCharacters++;
            if (g_SettingDualSimNameTaRestCharacters > 9)
            {
                LabelValue[0] = g_SettingDualSimNameTaRestCharacters / 10 + 0x30;
                LabelValue[1] = g_SettingDualSimNameTaRestCharacters % 10 + 0x30;
            }
            else
            {
                LabelValue[0] = g_SettingDualSimNameTaRestCharacters + 0x30;
            }
            lv_label_set_text(NormalNoTitleLblTaDesc->ContLabelTr.Label, LabelValue);
        }

        return(0);

    case KEY_SOFTLEFT:
        Nav_Back(ACT_ID_ANY);
        return(1);

    case KEY_0:
    case KEY_1:
    case KEY_2:
    case KEY_3:
    case KEY_4:
    case KEY_5:
    case KEY_6:
    case KEY_7:
    case KEY_8:
    case KEY_9:             // INPUT
        if (g_SettingDualSimNameTaRestCharacters > 0)
        {
            g_SettingDualSimNameTaRestCharacters--;
            if (g_SettingDualSimNameTaRestCharacters > 9)
            {
                LabelValue[0] = g_SettingDualSimNameTaRestCharacters / 10 + 0x30;
                LabelValue[1] = g_SettingDualSimNameTaRestCharacters % 10 + 0x30;
            }
            else
            {
                LabelValue[0] = g_SettingDualSimNameTaRestCharacters + 0x30;
            }
            lv_label_set_text(NormalNoTitleLblTaDesc->ContLabelTr.Label, LabelValue);
        }

        return(0);

    case KEY_END:
        Nav_Home(ACT_ID_ANY);
        return(1);

    default:
        return(0);
    } /* switch */
}     /* Display_Setting_Dual_Sim_Name_Edit_KeyCb */

/**
 * display Settings_Dual_Sim_Name_Edit
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Edit()
{
    UI_Normal_NoTitle_Label_Ta_Desc_t *NormalNoTitleLblTaDesc = NULL;
    Nav_Func_List_t                   FuncList;

    NormalNoTitleLblTaDesc = (UI_Normal_NoTitle_Label_Ta_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_NoTitle_Label_Ta_Desc_t));
    Hal_Mem_Set(NormalNoTitleLblTaDesc, 0, sizeof(UI_Normal_NoTitle_Label_Ta_Desc_t));

#define _INPUT_METHOD_FUNCTION_SUPPORTED_    0
#if _INPUT_METHOD_FUNCTION_SUPPORTED_
    UINT8 IME_Mode;

    IME_Mode = IME_GetDefaultInputMethodMode();
    if (IME_MODE_PINYIN == IME_Mode)
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_PINYIN;
    }
    else if (IME_MODE_ABC_UPPER_CASE == IME_Mode)
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_ABC_UPPER_CASE;
    }
    else if (IME_MODE_ABC_LOWER_CASE == IME_Mode)
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_ABC_LOWER_CASE;
    }
    else if (IME_MODE_ABC_CAMEL_CASE == IME_Mode)
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_ABC_CAMEL_CASE;
    }
    else if (IME_MODE_123_NUMBER == IME_Mode)
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_123_NUMBER;
    }
    else
    {
        NormalNoTitleLblTaDesc->ContLabelTl.TxtId = PHONE_TEXT_ID_CHN_STROKE;
    }
#endif
    NormalNoTitleLblTaDesc->ContLabelTl.TxtAlign = LV_LABEL_ALIGN_LEFT;

    // NormalNoTitleLblTaDesc->ContLabelTr.TxtId = ;     //Set in OnCreate() handling
    NormalNoTitleLblTaDesc->ContLabelTr.TxtAlign = LV_LABEL_ALIGN_RIGHT;

    NormalNoTitleLblTaDesc->ContLabel.TxtId    = PHONE_TEXT_ID_SIM_NAME;
    NormalNoTitleLblTaDesc->ContLabel.TxtAlign = LV_LABEL_ALIGN_LEFT;
    NormalNoTitleLblTaDesc->ContTa.TaTxt       = (INT8 *)Hal_Mem_Alloc(NV_SETTING_MAX_SIM_NAME_LEN);
    Hal_Mem_Copy(NormalNoTitleLblTaDesc->ContTa.TaTxt, g_SettingDualSimMng.SimName[g_SettingDualSimSelected - 1], NV_SETTING_MAX_SIM_NAME_LEN);
    NormalNoTitleLblTaDesc->ContTa.TaCursorHide = FALSE;
    NormalNoTitleLblTaDesc->ContTa.TaAlign      = LV_LABEL_ALIGN_LEFT;

    NormalNoTitleLblTaDesc->ButtonCont.ButtonL.Valid = TRUE;
    NormalNoTitleLblTaDesc->ButtonCont.ButtonL.TxtId = PHONE_TEXT_ID_BACK;
    NormalNoTitleLblTaDesc->ButtonCont.ButtonM.Valid = TRUE;
    NormalNoTitleLblTaDesc->ButtonCont.ButtonM.TxtId = PHONE_TEXT_ID_OK;
    NormalNoTitleLblTaDesc->ButtonCont.ButtonR.Valid = TRUE;
    NormalNoTitleLblTaDesc->ButtonCont.ButtonR.TxtId = PHONE_TEXT_ID_CLEAR;

    NormalNoTitleLblTaDesc->KeyFunc = Display_Setting_Dual_Sim_Name_Edit_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow         = UI_Normal_NoTitle_Label_Ta_Create;
    FuncList.OnCreate       = Display_Setting_Dual_Sim_Name_Edit_Create;
    FuncList.OnDestroy      = Display_Setting_Dual_Sim_Name_Edit_Destroy;
    FuncList.OnRestoreState = Display_Setting_Dual_Sim_Name_Edit_RestoreState;

    gp_SettingDualSimSettingCurNormalNoTitleLblTaUIDesc = (VOID *)NormalNoTitleLblTaDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_SIM_NAME, ACT_ID_SETTING_DUAL_SIM_NAME_EDIT, &FuncList, (VOID *)NormalNoTitleLblTaDesc);
} /* Display_Setting_Dual_Sim_Name_Edit */

VOID Display_Setting_Dual_Sim_Name_Edit_Sim1_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;

        NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)gp_SettingDualSimSettingCurListOnlyUIDesc;

        g_SettingDualSimSelected      = 1;
        NormalLstOnlyDesc->List.Index = 0;
        Display_Setting_Dual_Sim_Name_Edit();
    }
}

VOID Display_Setting_Dual_Sim_Name_Edit_Sim2_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;

        NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)gp_SettingDualSimSettingCurListOnlyUIDesc;

        g_SettingDualSimSelected      = 2;
        NormalLstOnlyDesc->List.Index = 1;
        Display_Setting_Dual_Sim_Name_Edit();
    }
}

/**
 *
 * Callback of Settings_Dual_Sim_Name, on destroy
 * param (in) NormalLstOnlyDesc: UI_Normal_List_Only_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Destroy(VOID *pPara)
{
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc = NULL;
    UINT8                      i                  = 0;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)pPara;

    for (i = 0; i < NormalLstOnlyDesc->List.ListButtonCnt; i++)
    {
        Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList[i].BtnTxt);
    }

    Hal_Mem_Free(NormalLstOnlyDesc->List.ButtonList);
    Hal_Mem_Free(NormalLstOnlyDesc);
}

/**
 *
 * Callback of Settings_Dual_Sim_Name, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Sim_Name_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    if (KEY_SOFTRIGHT == key_val)
    {
        Nav_Back(ACT_ID_SETTING_DUAL_SIM_NAME);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
}

/**
 * display Settings_Dual_Sim_Name
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name(VOID)
{
    // SIM name
    UI_Normal_List_Only_Desc_t *NormalLstOnlyDesc;
    Nav_Func_List_t            FuncList;

    NormalLstOnlyDesc = (UI_Normal_List_Only_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Normal_List_Only_Desc_t));
    Hal_Mem_Set(NormalLstOnlyDesc, 0, sizeof(UI_Normal_List_Only_Desc_t));

    NormalLstOnlyDesc->TitleBar.TxtId      = PHONE_TEXT_ID_SIM_NAME;
    NormalLstOnlyDesc->TitleBar.TxtAlign   = LV_LABEL_ALIGN_CENTER;
    NormalLstOnlyDesc->TitleBar.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    NormalLstOnlyDesc->List.Index         = 0;
    NormalLstOnlyDesc->List.ListButtonCnt = 2;
    NormalLstOnlyDesc->List.ButtonList    = (UI_Button_Desc_t *)Hal_Mem_Alloc(sizeof(UI_Button_Desc_t) * 2);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList, 0, sizeof(UI_Button_Desc_t) * 2);

    NormalLstOnlyDesc->List.ButtonList[0].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[0].ButtonIndex = 0;
    NormalLstOnlyDesc->List.ButtonList[0].TxtId       = LV_LANG_TXT_ID_NONE;
    NormalLstOnlyDesc->List.ButtonList[0].ReleaseFun  = Display_Setting_Dual_Sim_Name_Edit_Sim1_Cb;
    NormalLstOnlyDesc->List.ButtonList[0].BtnTxt      = (INT8 *)Hal_Mem_Alloc(NV_SETTING_MAX_SIM_NAME_LEN + 1);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList[0].BtnTxt, 0, NV_SETTING_MAX_SIM_NAME_LEN + 1);
    Hal_Mem_Copy(NormalLstOnlyDesc->List.ButtonList[0].BtnTxt, g_SettingDualSimMng.SimName[MMI_MODEM_SIM_1], NV_SETTING_MAX_SIM_NAME_LEN + 1);

    NormalLstOnlyDesc->List.ButtonList[1].Valid       = TRUE;
    NormalLstOnlyDesc->List.ButtonList[1].ButtonIndex = 1;
    NormalLstOnlyDesc->List.ButtonList[1].TxtId       = LV_LANG_TXT_ID_NONE;
    NormalLstOnlyDesc->List.ButtonList[1].ReleaseFun  = Display_Setting_Dual_Sim_Name_Edit_Sim2_Cb;
    NormalLstOnlyDesc->List.ButtonList[1].BtnTxt      = (INT8 *)Hal_Mem_Alloc(NV_SETTING_MAX_SIM_NAME_LEN + 1);
    Hal_Mem_Set(NormalLstOnlyDesc->List.ButtonList[1].BtnTxt, 0, NV_SETTING_MAX_SIM_NAME_LEN + 1);
    Hal_Mem_Copy(NormalLstOnlyDesc->List.ButtonList[1].BtnTxt, g_SettingDualSimMng.SimName[MMI_MODEM_SIM_2], NV_SETTING_MAX_SIM_NAME_LEN + 1);

    NormalLstOnlyDesc->BtnBar.ButtonL.Valid = FALSE;
    NormalLstOnlyDesc->BtnBar.ButtonM.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonM.TxtId = PHONE_TEXT_ID_SELECT;
    NormalLstOnlyDesc->BtnBar.ButtonR.Valid = TRUE;
    NormalLstOnlyDesc->BtnBar.ButtonR.TxtId = PHONE_TEXT_ID_BACK;

    NormalLstOnlyDesc->KeyFunc = Display_Setting_Dual_Sim_Name_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow    = UI_Normal_List_Only_Create;
    FuncList.OnDestroy = Display_Setting_Dual_Sim_Name_Destroy;

    gp_SettingDualSimSettingCurListOnlyUIDesc = (VOID *)NormalLstOnlyDesc;
    Nav_Forward(ACT_ID_SETTING_DUAL_SIM_SETTINGS, ACT_ID_SETTING_DUAL_SIM_NAME, &FuncList, (VOID *)NormalLstOnlyDesc);
} /* Display_Setting_Dual_Sim_Name */

/**
 * Callback Function of Settings_Dual_Sim_Name
 * param (in) Btn: lv_obj_t*
 * param (in) Event: lv_event_t
 * return void:
 */
VOID Display_Setting_Dual_Sim_Name_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if (LV_EVENT_CLICKED == Event)
    {
        Display_Setting_Dual_Sim_Name();
    }
}

/**
 * Set standby mode
 * param (in) DefaultSim: SETTING_DEFAULT_DULT_SIM
 * return void:
 */
VOID Display_Setting_Dual_Sim_Settings_UI_Parameter_Select(SETTING_DEFAULT_SERVICE_SIM SimStandbyMode)
{
    UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;
    UINT8                           i                   = 0;

    pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

    if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
    {
        pNormalContLstDesc->ContList.ListContainerCnt = 4;

        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_DEFSIM_CALLS;
        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
        pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
        if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Call)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;
        }
        else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Call)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
        }
        else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Call)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
        }
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Default_Sim_for_calls_Cb;

        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_DEFSIM_SMS;
        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
        pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
        if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Msg)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;
        }
        else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Msg)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
        }
        else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Msg)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
        }
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Default_Sim_for_msgs_Cb;
    }
    else
    {
        pNormalContLstDesc->ContList.ListContainerCnt = 2;
    }

    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_STANDBY_MODE;
    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
    pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
    if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
    {
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_DUAL_SIM;
    }
    else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
    }
    else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Standby)
    {
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
    }
    pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
    pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Standby_Mode_Cb;

    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_SIM_NAME;
    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_NULL;
    pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
    pNormalContLstDesc->ContList.ContainerList[i].ReleaseFunc      = Display_Setting_Dual_Sim_Name_Cb;
} /* Display_Setting_Dual_Sim_Settings_UI_Parameter_Select */

/**
 *
 * Callback of Setting_Dual_Sim_Settings, on destroy
 * param (in) pNormalContLstDesc: UI_Normal_Container_List_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Settings_Destroy(VOID *pPara)
{
    UI_Normal_Container_List_Desc_t *pNormalContLstDesc = NULL;

    pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)pPara;

    Hal_Mem_Free(pNormalContLstDesc->ContList.ContainerList);
    Hal_Mem_Free(pNormalContLstDesc);
}

/**
 *
 * Callback of Setting_Dual_Sim_Settings, on restore state
 * param (in) pNormalContLstDesc: UI_Normal_Container_List_Desc_t*
 * return void:
 */
VOID Display_Setting_Dual_Sim_Settings_RestoreState(VOID *pNormalContLstDesc)
{
    gp_SettingDualSimSettingCurContainerListUIDesc = (VOID *)pNormalContLstDesc;
}

/**
 *
 * Callback of Setting_Dual_Sim_Settings, KeyCb
 * param (in) obj: lv_obj_t*
 *       (in) key_sta: UI_KEY_STATUS
 *       (in) key_val: UI_KEY_VALUE
 * return UINT8: 0--call system handling outside
 *               1--handled inside
 */
UINT8 Display_Setting_Dual_Sim_Settings_KeyCb(lv_obj_t *obj, UI_KEY_STATUS key_sta, UI_KEY_VALUE key_val)
{
    UI_Normal_Container_List_Desc_t *pNormalContLstDesc;

    if (KEY_RELEASED != key_sta)
    {
        return(0);
    }

    pNormalContLstDesc = (UI_Normal_Container_List_Desc_t *)gp_SettingDualSimSettingCurContainerListUIDesc;

    if (KEY_DOWN == key_val)
    {
        pNormalContLstDesc->ContList.Index++;
        pNormalContLstDesc->ContList.Index %= pNormalContLstDesc->ContList.ListContainerCnt;
        return(0);
    }
    else if (KEY_UP == key_val)
    {
        pNormalContLstDesc->ContList.Index += pNormalContLstDesc->ContList.ListContainerCnt;
        pNormalContLstDesc->ContList.Index--;
        pNormalContLstDesc->ContList.Index %= pNormalContLstDesc->ContList.ListContainerCnt;
        return(0);
    }
    else if (KEY_SOFTRIGHT == key_val)
    {
        Nav_Back(ACT_ID_SETTING_DUAL_SIM_SETTINGS);
        return(1);
    }
    else if (KEY_END == key_val)
    {
        Nav_Home(ACT_ID_ANY);
        return(1);
    }
    else
    {
        return(0);
    }
} /* Display_Setting_Dual_Sim_Settings_KeyCb */

/**
 * display Setting_Dual_Sim_Settings
 * param (in) void:
 * return void:
 */
VOID Display_Setting_Dual_Sim_Settings(VOID)
{
    Nav_Func_List_t                 FuncList;
    UI_Normal_Container_List_Desc_t *pNormalContLstDesc;
    UINT8                           i = 0;

    // Alloc memory for dual sim setting UI display
    pNormalContLstDesc = Hal_Mem_Alloc(sizeof(UI_Normal_Container_List_Desc_t));
    Hal_Mem_Set(pNormalContLstDesc, 0, sizeof(UI_Normal_Container_List_Desc_t));

    pNormalContLstDesc->TitleBar.TxtId      = PHONE_TEXT_ID_DUALSIM_SETTING;
    pNormalContLstDesc->TitleBar.TxtAlign   = LV_LABEL_ALIGN_CENTER;
    pNormalContLstDesc->TitleBar.LabelAlign = LV_ALIGN_IN_TOP_LEFT;

    pNormalContLstDesc->ContList.Index = 0;

    if ((TRUE == g_SettingSimStatus[MMI_MODEM_SIM_1]) && (TRUE == g_SettingSimStatus[MMI_MODEM_SIM_2]) && (FALSE == g_SettingPhoneSettingMng.FlightModeOn))
    {
        pNormalContLstDesc->ContList.ContainerList = Hal_Mem_Alloc(sizeof(UI_Container_Base_Desc_t) * 4);
        Hal_Mem_Set(pNormalContLstDesc->ContList.ContainerList, 0, sizeof(UI_Container_Base_Desc_t) * 4);

        if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
        {
            pNormalContLstDesc->ContList.ListContainerCnt = 4;

            pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_DEFSIM_CALLS;
            pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
            pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
            if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Call)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;
            }
            else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Call)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
            }
            else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Call)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
            }
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Default_Sim_for_calls_Cb;

            pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_DEFSIM_SMS;
            pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
            pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
            if (SETTING_ASK_EVERY_TIME == g_SettingDualSimMng.DefaultSim4Msg)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_ASK_EVE_TIME;
            }
            else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Msg)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
            }
            else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Msg)
            {
                pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
            }
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
            pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Default_Sim_for_msgs_Cb;
        }
        else
        {
            pNormalContLstDesc->ContList.ListContainerCnt = 2;
        }

        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_STANDBY_MODE;
        pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_LABEL;
        pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
        if (SETTING_DEFAULT_DULT_SIM == g_SettingDualSimMng.DefaultSim4Standby)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_DUAL_SIM;
        }
        else if (SETTING_DEFAULT_SIM1 == g_SettingDualSimMng.DefaultSim4Standby)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM1;
        }
        else if (SETTING_DEFAULT_SIM2 == g_SettingDualSimMng.DefaultSim4Standby)
        {
            pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtId = PHONE_TEXT_ID_SIM2;
        }
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.TxtAlign   = LV_LABEL_ALIGN_RIGHT;
        pNormalContLstDesc->ContList.ContainerList[i].u.Label2.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
        pNormalContLstDesc->ContList.ContainerList[i++].ReleaseFunc       = Display_Setting_Dual_Standby_Mode_Cb;
    }
    else
    {
        pNormalContLstDesc->ContList.ListContainerCnt = 1;
        pNormalContLstDesc->ContList.ContainerList    = Hal_Mem_Alloc(sizeof(UI_Container_Base_Desc_t));
        Hal_Mem_Set(pNormalContLstDesc->ContList.ContainerList, 0, sizeof(UI_Container_Base_Desc_t));
    }

    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtId      = PHONE_TEXT_ID_SIM_NAME;
    pNormalContLstDesc->ContList.ContainerList[i].Label.TxtAlign   = LV_LABEL_ALIGN_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Label.LabelAlign = LV_ALIGN_IN_TOP_LEFT;
    pNormalContLstDesc->ContList.ContainerList[i].Choise           = UI_BASE_OBJ_NULL;
    pNormalContLstDesc->ContList.ContainerList[i].Valid            = TRUE;
    pNormalContLstDesc->ContList.ContainerList[i].ReleaseFunc      = Display_Setting_Dual_Sim_Name_Cb;

    pNormalContLstDesc->ButtonBar.ButtonL.Valid       = FALSE;
    pNormalContLstDesc->ButtonBar.ButtonM.Valid       = TRUE;
    pNormalContLstDesc->ButtonBar.ButtonM.ButtonIndex = 1;
    pNormalContLstDesc->ButtonBar.ButtonM.TxtId       = PHONE_TEXT_ID_SELECT;
    pNormalContLstDesc->ButtonBar.ButtonR.Valid       = TRUE;
    pNormalContLstDesc->ButtonBar.ButtonR.ButtonIndex = 2;
    pNormalContLstDesc->ButtonBar.ButtonR.TxtId       = PHONE_TEXT_ID_BACK;

    pNormalContLstDesc->KeyFunc = Display_Setting_Dual_Sim_Settings_KeyCb;

    Hal_Mem_Set(&FuncList, 0, sizeof(Nav_Func_List_t));
    FuncList.OnShow         = UI_Normal_Container_List_Create;
    FuncList.OnDestroy      = Display_Setting_Dual_Sim_Settings_Destroy;
    FuncList.OnRestoreState = Display_Setting_Dual_Sim_Settings_RestoreState;

    gp_SettingDualSimSettingCurContainerListUIDesc = (VOID *)pNormalContLstDesc;
    Nav_Forward(ACT_ID_SETTING, ACT_ID_SETTING_DUAL_SIM_SETTINGS, &FuncList, pNormalContLstDesc);
} /* Display_Setting_Dual_Sim_Settings */

/**
 * Callback Functions
 */
VOID Display_Setting_Dual_Sim_Settings_Cb(lv_obj_t *Btn, lv_event_t Event)
{
    if(LV_EVENT_CLICKED == Event)
    {
        Display_Setting_Dual_Sim_Settings();
    }
}
